$NetBSD$

--- include/vki/vki-scnums-netbsd.h.orig	2019-03-28 09:26:43.803009544 +0000
+++ include/vki/vki-scnums-netbsd.h
@@ -0,0 +1,466 @@
+
+/*
+   This file is part of Valgrind, a dynamic binary instrumentation
+   framework.
+
+   Copyright (C) 2000-2005 Julian Seward 
+      jseward@acm.org
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2 of the
+   License, or (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307, USA.
+
+   The GNU General Public License is contained in the file COPYING.
+*/
+
+#ifndef __VKI_UNISTD_NETBSD_H
+#define __VKI_UNISTD_NETBSD_H
+
+#define VG_NETBSD_SYSCALL_STD	0
+#define VG_NETBSD_SYSCALL0	1
+#define VG_NETBSD_SYSCALL198	2
+
+// From sys/syscall.h
+
+#define	__NR_syscall	0
+#define	__NR_exit	1
+#define	__NR_fork	2
+#define	__NR_read	3
+#define	__NR_write	4
+#define	__NR_open	5
+#define	__NR_close	6
+#define	__NR_compat_50_wait4	7
+#define	__NR_compat_43_ocreat	8
+#define	__NR_link	9
+#define	__NR_unlink	10
+#define	__NR_chdir	12
+#define	__NR_fchdir	13
+#define	__NR_compat_50_mknod	14
+#define	__NR_chmod	15
+#define	__NR_chown	16
+#define	__NR_break	17
+#define	__NR_compat_20_getfsstat	18
+#define	__NR_compat_43_olseek	19
+#define	__NR_getpid	20
+#define	__NR_compat_40_mount	21
+#define	__NR_unmount	22
+#define	__NR_setuid	23
+#define	__NR_getuid	24
+#define	__NR_geteuid	25
+#define	__NR_ptrace	26
+#define	__NR_recvmsg	27
+#define	__NR_sendmsg	28
+#define	__NR_recvfrom	29
+#define	__NR_accept	30
+#define	__NR_getpeername	31
+#define	__NR_getsockname	32
+#define	__NR_access	33
+#define	__NR_chflags	34
+#define	__NR_fchflags	35
+#define	__NR_sync	36
+#define	__NR_kill	37
+#define	__NR_compat_43_stat43	38
+#define	__NR_getppid	39
+#define	__NR_compat_43_lstat43	40
+#define	__NR_dup	41
+#define	__NR_pipe	42
+#define	__NR_getegid	43
+#define	__NR_profil	44
+#define	__NR_ktrace	45
+#define	__NR_compat_13_sigaction13	46
+#define	__NR_getgid	47
+#define	__NR_compat_13_sigprocmask13	48
+#define	__NR___getlogin	49
+#define	__NR___setlogin	50
+#define	__NR_acct	51
+#define	__NR_compat_13_sigpending13	52
+#define	__NR_compat_13_sigaltstack13	53
+#define	__NR_ioctl	54
+#define	__NR_compat_12_oreboot	55
+#define	__NR_revoke	56
+#define	__NR_symlink	57
+#define	__NR_readlink	58
+#define	__NR_execve	59
+#define	__NR_umask	60
+#define	__NR_chroot	61
+#define	__NR_compat_43_fstat43	62
+#define	__NR_compat_43_ogetkerninfo	63
+#define	__NR_compat_43_ogetpagesize	64
+#define	__NR_compat_12_msync	65
+#define	__NR_vfork	66
+#define	__NR_compat_43_ommap	71
+#define	__NR_vadvise	72
+#define	__NR_munmap	73
+#define	__NR_mprotect	74
+#define	__NR_madvise	75
+#define	__NR_mincore	78
+#define	__NR_getgroups	79
+#define	__NR_setgroups	80
+#define	__NR_getpgrp	81
+#define	__NR_setpgid	82
+#define	__NR_compat_50_setitimer	83
+#define	__NR_compat_43_owait	84
+#define	__NR_compat_12_oswapon	85
+#define	__NR_compat_50_getitimer	86
+#define	__NR_compat_43_ogethostname	87
+#define	__NR_compat_43_osethostname	88
+#define	__NR_compat_43_ogetdtablesize	89
+#define	__NR_dup2	90
+#define	__NR_fcntl	92
+#define	__NR_compat_50_select	93
+#define	__NR_fsync	95
+#define	__NR_setpriority	96
+#define	__NR_compat_30_socket	97
+#define	__NR_connect	98
+#define	__NR_compat_43_oaccept	99
+#define	__NR_getpriority	100
+#define	__NR_compat_43_osend	101
+#define	__NR_compat_43_orecv	102
+#define	__NR_compat_13_sigreturn13	103
+#define	__NR_bind	104
+#define	__NR_setsockopt	105
+#define	__NR_listen	106
+#define	__NR_compat_43_osigvec	108
+#define	__NR_compat_43_osigblock	109
+#define	__NR_compat_43_osigsetmask	110
+#define	__NR_compat_13_sigsuspend13	111
+#define	__NR_compat_43_osigstack	112
+#define	__NR_compat_43_orecvmsg	113
+#define	__NR_compat_43_osendmsg	114
+#define	__NR_compat_50_gettimeofday	116
+#define	__NR_compat_50_getrusage	117
+#define	__NR_getsockopt	118
+#define	__NR_readv	120
+#define	__NR_writev	121
+#define	__NR_compat_50_settimeofday	122
+#define	__NR_fchown	123
+#define	__NR_fchmod	124
+#define	__NR_compat_43_orecvfrom	125
+#define	__NR_setreuid	126
+#define	__NR_setregid	127
+#define	__NR_rename	128
+#define	__NR_compat_43_otruncate	129
+#define	__NR_compat_43_oftruncate	130
+#define	__NR_flock	131
+#define	__NR_mkfifo	132
+#define	__NR_sendto	133
+#define	__NR_shutdown	134
+#define	__NR_socketpair	135
+#define	__NR_mkdir	136
+#define	__NR_rmdir	137
+#define	__NR_compat_50_utimes	138
+#define	__NR_compat_50_adjtime	140
+#define	__NR_compat_43_ogetpeername	141
+#define	__NR_compat_43_ogethostid	142
+#define	__NR_compat_43_osethostid	143
+#define	__NR_compat_43_ogetrlimit	144
+#define	__NR_compat_43_osetrlimit	145
+#define	__NR_compat_43_okillpg	146
+#define	__NR_setsid	147
+#define	__NR_compat_50_quotactl	148
+#define	__NR_compat_43_oquota	149
+#define	__NR_compat_43_ogetsockname	150
+#define	__NR_nfssvc	155
+#define	__NR_compat_43_ogetdirentries	156
+#define	__NR_compat_20_statfs	157
+#define	__NR_compat_20_fstatfs	158
+#define	__NR_compat_30_getfh	161
+#define	__NR_compat_09_ogetdomainname	162
+#define	__NR_compat_09_osetdomainname	163
+#define	__NR_compat_09_ouname	164
+#define	__NR_sysarch	165
+#define	__NR_compat_10_osemsys	169
+#define	__NR_compat_10_omsgsys	170
+#define	__NR_compat_10_oshmsys	171
+#define	__NR_pread	173
+#define	__NR_pwrite	174
+#define	__NR_compat_30_ntp_gettime	175
+#define	__NR_ntp_adjtime	176
+#define	__NR_setgid	181
+#define	__NR_setegid	182
+#define	__NR_seteuid	183
+#define	__NR_lfs_bmapv	184
+#define	__NR_lfs_markv	185
+#define	__NR_lfs_segclean	186
+#define	__NR_compat_50_lfs_segwait	187
+#define	__NR_compat_12_stat12	188
+#define	__NR_compat_12_fstat12	189
+#define	__NR_compat_12_lstat12	190
+#define	__NR_pathconf	191
+#define	__NR_fpathconf	192
+#define	__NR_getsockopt2	193
+#define	__NR_getrlimit	194
+#define	__NR_setrlimit	195
+#define	__NR_compat_12_getdirentries	196
+#define	__NR_mmap	197
+#define	__NR___syscall	198
+#define	__NR_lseek	199
+#define	__NR_truncate	200
+#define	__NR_ftruncate	201
+#define	__NR___sysctl	202
+#define	__NR_mlock	203
+#define	__NR_munlock	204
+#define	__NR_undelete	205
+#define	__NR_compat_50_futimes	206
+#define	__NR_getpgid	207
+#define	__NR_reboot	208
+#define	__NR_poll	209
+#define	__NR_afssys	210
+#define	__NR_compat_14___semctl	220
+#define	__NR_semget	221
+#define	__NR_semop	222
+#define	__NR_semconfig	223
+#define	__NR_compat_14_msgctl	224
+#define	__NR_msgget	225
+#define	__NR_msgsnd	226
+#define	__NR_msgrcv	227
+#define	__NR_shmat	228
+#define	__NR_compat_14_shmctl	229
+#define	__NR_shmdt	230
+#define	__NR_shmget	231
+#define	__NR_compat_50_clock_gettime	232
+#define	__NR_compat_50_clock_settime	233
+#define	__NR_compat_50_clock_getres	234
+#define	__NR_timer_create	235
+#define	__NR_timer_delete	236
+#define	__NR_compat_50_timer_settime	237
+#define	__NR_compat_50_timer_gettime	238
+#define	__NR_timer_getoverrun	239
+#define	__NR_compat_50_nanosleep	240
+#define	__NR_fdatasync	241
+#define	__NR_mlockall	242
+#define	__NR_munlockall	243
+#define	__NR_compat_50___sigtimedwait	244
+#define	__NR_sigqueueinfo	245
+#define	__NR_modctl	246
+#define	__NR__ksem_init	247
+#define	__NR__ksem_open	248
+#define	__NR__ksem_unlink	249
+#define	__NR__ksem_close	250
+#define	__NR__ksem_post	251
+#define	__NR__ksem_wait	252
+#define	__NR__ksem_trywait	253
+#define	__NR__ksem_getvalue	254
+#define	__NR__ksem_destroy	255
+#define	__NR__ksem_timedwait	256
+#define	__NR_mq_open	257
+#define	__NR_mq_close	258
+#define	__NR_mq_unlink	259
+#define	__NR_mq_getattr	260
+#define	__NR_mq_setattr	261
+#define	__NR_mq_notify	262
+#define	__NR_mq_send	263
+#define	__NR_mq_receive	264
+#define	__NR_compat_50_mq_timedsend	265
+#define	__NR_compat_50_mq_timedreceive	266
+#define	__NR___posix_rename	270
+#define	__NR_swapctl	271
+#define	__NR_compat_30_getdents	272
+#define	__NR_minherit	273
+#define	__NR_lchmod	274
+#define	__NR_lchown	275
+#define	__NR_compat_50_lutimes	276
+#define	__NR___msync13	277
+#define	__NR_compat_30___stat13	278
+#define	__NR_compat_30___fstat13	279
+#define	__NR_compat_30___lstat13	280
+#define	__NR___sigaltstack14	281
+#define	__NR___vfork14	282
+#define	__NR___posix_chown	283
+#define	__NR___posix_fchown	284
+#define	__NR___posix_lchown	285
+#define	__NR_getsid	286
+#define	__NR___clone	287
+#define	__NR_fktrace	288
+#define	__NR_preadv	289
+#define	__NR_pwritev	290
+#define	__NR_compat_16___sigaction14	291
+#define	__NR___sigpending14	292
+#define	__NR___sigprocmask14	293
+#define	__NR___sigsuspend14	294
+#define	__NR_compat_16___sigreturn14	295
+#define	__NR___getcwd	296
+#define	__NR_fchroot	297
+#define	__NR_compat_30_fhopen	298
+#define	__NR_compat_30_fhstat	299
+#define	__NR_compat_20_fhstatfs	300
+#define	__NR_compat_50_____semctl13	301
+#define	__NR_compat_50___msgctl13	302
+#define	__NR_compat_50___shmctl13	303
+#define	__NR_lchflags	304
+#define	__NR_issetugid	305
+#define	__NR_utrace	306
+#define	__NR_getcontext	307
+#define	__NR_setcontext	308
+#define	__NR__lwp_create	309
+#define	__NR__lwp_exit	310
+#define	__NR__lwp_self	311
+#define	__NR__lwp_wait	312
+#define	__NR__lwp_suspend	313
+#define	__NR__lwp_continue	314
+#define	__NR__lwp_wakeup	315
+#define	__NR__lwp_getprivate	316
+#define	__NR__lwp_setprivate	317
+#define	__NR__lwp_kill	318
+#define	__NR__lwp_detach	319
+#define	__NR_compat_50__lwp_park	320
+#define	__NR__lwp_unpark	321
+#define	__NR__lwp_unpark_all	322
+#define	__NR__lwp_setname	323
+#define	__NR__lwp_getname	324
+#define	__NR__lwp_ctl	325
+#define	__NR_compat_60_sa_register	330
+#define	__NR_compat_60_sa_stacks	331
+#define	__NR_compat_60_sa_enable	332
+#define	__NR_compat_60_sa_setconcurrency	333
+#define	__NR_compat_60_sa_yield	334
+#define	__NR_compat_60_sa_preempt	335
+#define	__NR___sigaction_sigtramp	340
+#define	__NR_rasctl	343
+#define	__NR_kqueue	344
+#define	__NR_compat_50_kevent	345
+#define	__NR__sched_setparam	346
+#define	__NR__sched_getparam	347
+#define	__NR__sched_setaffinity	348
+#define	__NR__sched_getaffinity	349
+#define	__NR_sched_yield	350
+#define	__NR__sched_protect	351
+#define	__NR_fsync_range	354
+#define	__NR_uuidgen	355
+#define	__NR_getvfsstat	356
+#define	__NR_statvfs1	357
+#define	__NR_fstatvfs1	358
+#define	__NR_compat_30_fhstatvfs1	359
+#define	__NR_extattrctl	360
+#define	__NR_extattr_set_file	361
+#define	__NR_extattr_get_file	362
+#define	__NR_extattr_delete_file	363
+#define	__NR_extattr_set_fd	364
+#define	__NR_extattr_get_fd	365
+#define	__NR_extattr_delete_fd	366
+#define	__NR_extattr_set_link	367
+#define	__NR_extattr_get_link	368
+#define	__NR_extattr_delete_link	369
+#define	__NR_extattr_list_fd	370
+#define	__NR_extattr_list_file	371
+#define	__NR_extattr_list_link	372
+#define	__NR_compat_50_pselect	373
+#define	__NR_compat_50_pollts	374
+#define	__NR_setxattr	375
+#define	__NR_lsetxattr	376
+#define	__NR_fsetxattr	377
+#define	__NR_getxattr	378
+#define	__NR_lgetxattr	379
+#define	__NR_fgetxattr	380
+#define	__NR_listxattr	381
+#define	__NR_llistxattr	382
+#define	__NR_flistxattr	383
+#define	__NR_removexattr	384
+#define	__NR_lremovexattr	385
+#define	__NR_fremovexattr	386
+#define	__NR_compat_50___stat30	387
+#define	__NR_compat_50___fstat30	388
+#define	__NR_compat_50___lstat30	389
+#define	__NR___getdents30	390
+#define	__NR_compat_30___fhstat30	392
+#define	__NR_compat_50___ntp_gettime30	393
+#define	__NR___socket30	394
+#define	__NR___getfh30	395
+#define	__NR___fhopen40	396
+#define	__NR___fhstatvfs140	397
+#define	__NR_compat_50___fhstat40	398
+#define	__NR_aio_cancel	399
+#define	__NR_aio_error	400
+#define	__NR_aio_fsync	401
+#define	__NR_aio_read	402
+#define	__NR_aio_return	403
+#define	__NR_compat_50_aio_suspend	404
+#define	__NR_aio_write	405
+#define	__NR_lio_listio	406
+#define	__NR___mount50	410
+#define	__NR_mremap	411
+#define	__NR_pset_create	412
+#define	__NR_pset_destroy	413
+#define	__NR_pset_assign	414
+#define	__NR__pset_bind	415
+#define	__NR___posix_fadvise50	416
+#define	__NR___select50	417
+#define	__NR___gettimeofday50	418
+#define	__NR___settimeofday50	419
+#define	__NR___utimes50	420
+#define	__NR___adjtime50	421
+#define	__NR___lfs_segwait50	422
+#define	__NR___futimes50	423
+#define	__NR___lutimes50	424
+#define	__NR___setitimer50	425
+#define	__NR___getitimer50	426
+#define	__NR___clock_gettime50	427
+#define	__NR___clock_settime50	428
+#define	__NR___clock_getres50	429
+#define	__NR___nanosleep50	430
+#define	__NR_____sigtimedwait50	431
+#define	__NR___mq_timedsend50	432
+#define	__NR___mq_timedreceive50	433
+#define	__NR_compat_60__lwp_park	434
+#define	__NR___kevent50	435
+#define	__NR___pselect50	436
+#define	__NR___pollts50	437
+#define	__NR___aio_suspend50	438
+#define	__NR___stat50	439
+#define	__NR___fstat50	440
+#define	__NR___lstat50	441
+#define	__NR_____semctl50	442
+#define	__NR___shmctl50	443
+#define	__NR___msgctl50	444
+#define	__NR___getrusage50	445
+#define	__NR___timer_settime50	446
+#define	__NR___timer_gettime50	447
+#define	__NR___ntp_gettime50	448
+#define	__NR___wait450	449
+#define	__NR___mknod50	450
+#define	__NR___fhstat50	451
+#define	__NR_pipe2	453
+#define	__NR_dup3	454
+#define	__NR_kqueue1	455
+#define	__NR_paccept	456
+#define	__NR_linkat	457
+#define	__NR_renameat	458
+#define	__NR_mkfifoat	459
+#define	__NR_mknodat	460
+#define	__NR_mkdirat	461
+#define	__NR_faccessat	462
+#define	__NR_fchmodat	463
+#define	__NR_fchownat	464
+#define	__NR_fexecve	465
+#define	__NR_fstatat	466
+#define	__NR_utimensat	467
+#define	__NR_openat	468
+#define	__NR_readlinkat	469
+#define	__NR_symlinkat	470
+#define	__NR_unlinkat	471
+#define	__NR_futimens	472
+#define	__NR___quotactl	473
+#define	__NR_posix_spawn	474
+#define	__NR_recvmmsg	475
+#define	__NR_sendmmsg	476
+#define	__NR_clock_nanosleep	477
+#define	__NR____lwp_park60	478
+#define	__NR_posix_fallocate	479
+#define	__NR_fdiscard	480
+#define	__NR_wait6	481
+#define	__NR_clock_getcpuclockid2	482
+
+#define __NR_fake_sigreturn	1000
+
+#endif /* __VKI_UNISTD_NETBSD_H */
